#include "DynUtilities.h"

Timer :: Timer() : sf::Clock()
{
	Reset();
}

Timer :: Timer(int tick) : sf::Clock()
{
	this->_tick = tick;
}

void Timer :: SetTick(int i)
{
	_tick = i;
}

float Timer :: GetElapsedTime()
{
	return sf::Clock::GetElapsedTime();
}

bool Timer :: tick()
{
	if (GetElapsedTime()>=_tick)
	{
		Reset();
		return true;
	}
	else
		return false;
}

